package com.xucan.mapperstruct.listsource;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface SourceTargetMapper {
    SourceTargetMapper INSTANCE = Mappers.getMapper(SourceTargetMapper.class);

    // 单个对象的映射
    Target sourceToTarget(Source source);

    // 集合的映射
    List<Target> sourcesToTargets(List<Source> sources);
}    